package com.elec.controller.front;

import com.elec.domain.R;
import com.elec.service.ElectricityBillService;
import com.elec.service.NotificationRecordService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author yu
 * @date 2024/7/7
 */
@RestController
@RequestMapping("front/home")
public class HomeController {
    @Resource
    private ElectricityBillService electricityBillService;
    @Resource
    private NotificationRecordService notificationRecordService;
    @GetMapping("getElectricityConsumption")
    public R getElectricityConsumption() {
        return electricityBillService.getElectricityConsumption();
    }
    @GetMapping("getNotification")
    public R getNotification() {
        return notificationRecordService.getNotification();
    }
}
